
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Grebok.Common;
using Grebok.Common.Configuration;

namespace EVegetable.Persistence.Test.DataManager
{
    public class TIni_CodeModeManager : BaseManager
    {
        #region private field

        private static TIni_CodeModeManager manager;
        #endregion

        #region Properties
        
        public Int32 CodeModeID
        {
            get { return GetConfig<Int32>("CodeModeID"); }
            set { SetConfig<Int32>("CodeModeID", value); }
        }
        
        public String CodeModeAlia
        {
            get { return GetConfig<String>("CodeModeAlia"); }
            set { SetConfig<String>("CodeModeAlia", value); }
        }
        
        public String CodeName
        {
            get { return GetConfig<String>("CodeName"); }
            set { SetConfig<String>("CodeName", value); }
        }
        
        public String CodeSample
        {
            get { return GetConfig<String>("CodeSample"); }
            set { SetConfig<String>("CodeSample", value); }
        }
        

        #endregion

        #region Constructor

        /// <summary>
        /// TIni_CodeModeManager
        /// </summary>
        private TIni_CodeModeManager()
        {
            IApplicationConfiguration configuration = ApplicationConfigurationFactor.CreateApplicationConfiguration();
            appPropertiese = new ApplicationProperties(configuration[PropertiesConst.TINI_CODEMODE_PROPERTIES_FILE_NAME_KEY],
                configuration[PropertiesConst.TINI_CODEMODE_PROPERTIES_SECTION_NAME_KEY]);

            appPropertieseValues = new Dictionary<string, object>();
        }
        #endregion

        #region TIni_CodeModeManager Instance

        /// <summary>
        /// TIni_CodeModeManager's Instance
        /// </summary>
        public static TIni_CodeModeManager Instance
        {
            get
            {
                if (manager == null)
                {
                    manager = new TIni_CodeModeManager();
                }
                return manager;
            }
        }
        #endregion

    }
}
